package com.sumi.erp.service.impl;

import java.util.List;
import com.sumi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sumi.erp.mapper.BaseWarehouseGroupMapper;
import com.sumi.erp.domain.BaseWarehouseGroup;
import com.sumi.erp.service.IBaseWarehouseGroupService;

/**
 * 虚拟仓库组Service业务层处理
 * 
 * @author fgf67@163.com
 * @date 2024-06-28
 */
@Service
public class BaseWarehouseGroupServiceImpl implements IBaseWarehouseGroupService 
{
    @Autowired
    private BaseWarehouseGroupMapper baseWarehouseGroupMapper;

    /**
     * 查询虚拟仓库组
     * 
     * @param id 虚拟仓库组主键
     * @return 虚拟仓库组
     */
    @Override
    public BaseWarehouseGroup selectBaseWarehouseGroupById(Long id)
    {
        return baseWarehouseGroupMapper.selectBaseWarehouseGroupById(id);
    }

    /**
     * 查询虚拟仓库组列表
     * 
     * @param baseWarehouseGroup 虚拟仓库组
     * @return 虚拟仓库组
     */
    @Override
    public List<BaseWarehouseGroup> selectBaseWarehouseGroupList(BaseWarehouseGroup baseWarehouseGroup)
    {
        return baseWarehouseGroupMapper.selectBaseWarehouseGroupList(baseWarehouseGroup);
    }

    /**
     * 新增虚拟仓库组
     * 
     * @param baseWarehouseGroup 虚拟仓库组
     * @return 结果
     */
    @Override
    public int insertBaseWarehouseGroup(BaseWarehouseGroup baseWarehouseGroup)
    {
        baseWarehouseGroup.setCreateTime(DateUtils.getNowDate());
        return baseWarehouseGroupMapper.insertBaseWarehouseGroup(baseWarehouseGroup);
    }

    /**
     * 修改虚拟仓库组
     * 
     * @param baseWarehouseGroup 虚拟仓库组
     * @return 结果
     */
    @Override
    public int updateBaseWarehouseGroup(BaseWarehouseGroup baseWarehouseGroup)
    {
        return baseWarehouseGroupMapper.updateBaseWarehouseGroup(baseWarehouseGroup);
    }

    /**
     * 批量删除虚拟仓库组
     * 
     * @param ids 需要删除的虚拟仓库组主键
     * @return 结果
     */
    @Override
    public int deleteBaseWarehouseGroupByIds(Long[] ids)
    {
        return baseWarehouseGroupMapper.deleteBaseWarehouseGroupByIds(ids);
    }

    /**
     * 删除虚拟仓库组信息
     * 
     * @param id 虚拟仓库组主键
     * @return 结果
     */
    @Override
    public int deleteBaseWarehouseGroupById(Long id)
    {
        return baseWarehouseGroupMapper.deleteBaseWarehouseGroupById(id);
    }
}
